package vn.wallet.app.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import vn.wallet.app.dao.IRecordDAO;
import vn.wallet.app.domain.Record;
import vn.wallet.app.service.IRecordService;

@Transactional
@Service
public class RecordService implements IRecordService {

	@SuppressWarnings("unused")
	private static final Logger log = Logger.getLogger(RecordService.class);

	@Autowired
	IRecordDAO recordDAO;

	@Override
	public Record getById(int id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void update(Record obj) throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	public void delete(Record obj) throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	public void delete(int id) throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	public List<Record> getAll() throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Record> getAllByUserId(int userId) throws Exception {
		return recordDAO.getAllByUserId(userId);
	}

	@Override
	public List<?> findByExample(Record obj) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void update(Record... t) throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	public void delete(Record... t) throws Exception {
		// TODO Auto-generated method stub

	}

	@Override
	public void save(Record... objs) throws Exception {
		for (Record record : objs) {
			recordDAO.save(record);
		}
	}

	@Override
	public void save(Record obj) throws Exception {
		recordDAO.save(obj);
	}

}
